package guoanmaker.operator.business.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import guoanmaker.operator.business.model.OperatorContractDownloadLog;

/**
 * 
* @ClassName: OperatorContractDownloadLogRepository.java 
* @Description: 合同下载历史记录repository
* @author Cancerl
* @date 2018年1月5日
*  
 */
public interface OperatorContractDownloadLogRepository extends JpaRepository<OperatorContractDownloadLog, String> , JpaSpecificationExecutor<OperatorContractDownloadLog>{
	//根据合同id查询   时间倒叙倒叙查询合同
	List<OperatorContractDownloadLog> findAllByDownloadIdOrderByDateDesc(String downloadId);
	Page<OperatorContractDownloadLog> findAllByDownloadIdOrderByDateDesc(Pageable pageable,String downloadId);
	Page<OperatorContractDownloadLog> findAllByDownloadIdAndGuideEqualsOrderByDateDesc(Pageable pageable,String downloadId,String guide);
	Page<OperatorContractDownloadLog> findAllByDownloadIdAndGuideIsNullOrderByDateDesc(Pageable pageable,String downloadId);
}
